<?php
function __autoload($classname){
	global $file;
	$action = $classname;
	$classname = htmlspecialchars(substr($classname, 7), ENT_QUOTES, 'UTF-8');
	require_once DIR_APP.$file.$classname.'.app.php';
	if(!class_exists($action)){
		if(DEBUG){
			exit('控制器： '.$action.' 不存在');
		}else {
			header('HTTP/1.1 404 Not Found'); 
			header("status: 404 Not Found"); 
		}
	}
}